package com.pe.service.param.user;

import java.util.Map;

import com.pe.service.param.IServiceParam;

public class LoginServiceParam implements IServiceParam {
	private String id;
	private String password;
	private String email;
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@Override
	public void parseServiceParam(String jsonString) {
		// TODO Auto-generated method stub

	}
	@Override
	public void parseServiceParam(Map<String, String[]> serviceParams) {
		String email=null;
		String password=null;


		for(String reqParam : serviceParams.keySet()){
			if(reqParam.equalsIgnoreCase("password")){
				password=serviceParams.get(reqParam)[0];
				setPassword(password);
			}else if(reqParam.equalsIgnoreCase("email")){
				email=serviceParams.get(reqParam)[0];
				setEmail(email);
			}
		}

	}
}
